/*
 * 自定义弹窗消息组件
 */
<template>
  <div
    id="toastMsg"
    class="toast_main"
  >
    <p class="bottom fontsize28">
      {{text}}
    </p>
  </div>
</template>

<script>
export default {
  data () {
    return {
      text: '' // 传入消息内容
    }
  },
  methods: {
    showToast (msg) { // 具体显隐操作在components/index.js里，此处仅更换显示文本
      this.text = msg
    }
  }
}
</script>

<style lang="scss" scopedd>
.toast_main {
  p {
    width: fit-content;
    height: fit-content;
    padding: 12px 35px;
    border-radius: 25px; /*no*/
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 12px;
    color: #fff;
    position: fixed;
    margin: auto;
    left: 0;
    right: 0;
  }
  .bottom {
    bottom: 100px;
  }
}
</style>
